
<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <link rel="stylesheet" type="text/css" href="../../../../global/css/aui.css" />
    <link rel="stylesheet" type="text/css" href="./frm.css" />
</head>
<body>
    <div class="aui-content">
        <ul class="aui-list">
            <li class="aui-list-item">
                <div class="aui-list-item-inner">
                    <div class="aui-list-item-title">每天提醒我签到</div>
                    <div class="aui-list-item-right">
                        <input id="remind-me" type="checkbox" class="aui-switch" tapmode onclick="onCheckRemindMe(this);">
                    </div>
                </div>
            </li>
        </ul>
    </div>

	<div id="main">
        <div class="number-frame">
            <div id="c-days" class="aui-btn number">-</div>
        </div>
        <div class="ribbon-frame">
            <!-- <div class="pad"></div> -->
            <p>已连续签到天数</p>
            <img src="../../../../global/image/ribbon.png" />
        </div>
            <div id="signin-tips" class="tips">
                    使用<span class="use_coins"></span>金币，将连续签到升为<span></span>天
            </div>
        <div class="aui-bar aui-bar-tab">
            <div class="aui-bar-tab-item" tapmode onclick="">
                <img src="../../../../global/image/coins.png" />我的金币：<span id="coins-amount"></span>
            </div>
            <div class="aui-bar-tab-item" tapmode data-days="" onclick="">
                <img src="../../../../global/image/list.png" />签到记录
            </div>
        </div>
        <div class="separ"></div>
	</div>

    <div id="hot-goods"></div>
</body>


<script id="tpl-goods" type="text/x-dot-template">
	{{~it :cate:i}}
    <section class="aui-grid aui-margin-t-10">
        <div class="label">{{=cate.name}}</div>
        <div class="aui-row">
            {{~cate.goods :g:j}}
            <div class="aui-col-xs-6" data-url="{{=g.url}}" tapmode onclick="openGoods(this)">
				<img class="pic" src="../../../../global/image/ph.png" data-src="{{=g.image}}" />
                <div class="name">{{=g.name}}</div>
                <div class="amount">{{=g.price}}金币</div>
            </div>
            {{~}}
        </div>
    </section>
	{{~}}
</script>


<script id="sign_info" type="text/x-dot-template">
    <div class="number-frame">
        <div id="c-days" class="aui-btn number">{{=it.condays}}</div>
    </div>
    <div class="ribbon-frame">
        <!-- <div class="pad"></div> -->
        <p>已连续签到天数</p>
        <img src="../../../../global/image/ribbon.png" />
    </div>
    {{?it.missdays > 0}}
        <div id="signin-tips" class="tips {{=(isCanSign() ? 'hidden': '')}}">
            {{?it.coins > it.maybecredits}}
                使用<span class="use_coins">{{=it.maybecredits}}</span>金币，将连续签到升为<span>{{=it.maybecondays}}</span>天
            {{??}}
                您有机会将连续签到天数升为<span>{{=it.maybecondays}}</span>天，可是金币不足
            {{?}}
        </div>
        <div id="btn-signin" class="btn-frame">
            {{?isCanSign()}}
                <div id="do-sign-btn" class="aui-btn aui-btn-block aui-btn-primary" tapmode onclick="doSignIn(false, true);">今日签到</div>
            {{??it.coins > it.maybecredits}}
                <div class="aui-btn aui-btn-block aui-btn-primary" tapmode onclick="oneKeySignIn(this);">立即补签</div>
            {{??}}
                <div class="aui-btn aui-btn-block aui-btn-primary" tapmode onclick="views.openSignInRecWin();">手动补签</div>
            {{?}}
        </div>
    {{?}}
    <div class="aui-bar aui-bar-tab">
        <div class="aui-bar-tab-item" tapmode onclick="openMyCoins();">
            <img src="../../../../global/image/coins.png" />我的金币：<span id="coins-amount">{{=it.coins}}</span>
        </div>
        <div class="aui-bar-tab-item" tapmode data-days="{{=it.maybecondays}}" onclick="openSignInRec(this);">
            <img src="../../../../global/image/list.png" />签到记录
        </div>
    </div>
    <div class="separ"></div>
</script>

<script type="text/javascript" src="../../../../config.js"></script>
<script type="text/javascript" src="../../../../global/script/lib/api.js"></script>
<script type="text/javascript" src="../../../../global/script/lib/aui-dialog.js"></script>
<script type="text/javascript" src="../../../../global/script/lib/aui-toast.js"></script>
<script type="text/javascript" src="../../../../global/script/lib/doT.min.js"></script>
<script type="text/javascript" src="../../../../global/script/lib/aui-lazyload.js"></script>
<!-- <script type="text/javascript" src="../../../../global/script/lib/zepto.min.js"></script> -->
<script type="text/javascript" src="../../../../global/script/mylib.js"></script>
<script type="text/javascript" src="../../../../app.js"></script>
<script type="text/javascript" src="./frm.js"></script>

</html>


<script type="text/javascript" src="../../../../global/script/_fakeApi.js"></script>

<script type="text/javascript">
    window.mockGoods = {
        status: 200,
        msg: "ok",
        data: [
            {
                id: "1",
                name: "推荐商品",
                goods: [
                    {
                        id: "1",
                        name: "篮子",
                        price: "70",
                        image: "http://yun.duiba.com.cn/images/201805/q6ccdjzc4j.jpg",
                        url: "http://renqiu.ikongji.com/duiba/url?dbredirect=https%3A%2F%2Fgoods.m.duiba.com.cn%2Fmobile%2Fdetail%3FitemId%3D36598",
                    },
                    {
                        id: "2",
                        name: "篮子2",
                        price: "70",
                        image: "http://yun.duiba.com.cn/images/201805/q6ccdjzc4j.jpg",
                        url: "http://renqiu.ikongji.com/duiba/url?dbredirect=https%3A%2F%2Fgoods.m.duiba.com.cn%2Fmobile%2Fdetail%3FitemId%3D36598",
                    },
                ],
            },
            {
                id: "2",
                name: "虚拟商品",
                goods: [
                    {
                        id: "3",
                        name: "篮子2",
                        price: "70",
                        image: "http://yun.duiba.com.cn/images/201805/q6ccdjzc4j.jpg",
                        url: "http://renqiu.ikongji.com/duiba/url?dbredirect=https%3A%2F%2Fgoods.m.duiba.com.cn%2Fmobile%2Fdetail%3FitemId%3D36598",
                    }
                ],
            },
        ],
    }


    fooSignIn();
    fooHot();
</script>
